/*
 *	Extended string library for C
 *
 *	Copyright (C) 2011 XiaoJSoft Studio. All Rights Reserved.
 *	Copyright (C) Ji WenCong <whs_jwc@163.com>
 *
 *	This program is free software: you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation, either version 3 of the License, or
 *	(at your option) any later version.
 *
 *	This program is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#include "cross.h"

#ifndef DEFINED_COLLECTION
	struct f_collection
	{
		char *string;
		int key;
		struct f_collection *previous;
		struct f_collection *next;
	};
	typedef struct f_collection collection;
	#define DEFINED_COLLECTION
#endif

int isNumeric(char *szExpression);
int strlen_ext(char *sc);
char* strfill_ext(int lpLength, char szFill);
long double strtod_ext(char *nptr, char **endptr);
char* strjoin_ext(char *szInput1, char *szInput2);
int strin_ext(int lpStart, char *source, char *find);
int strin_ext_expr(int lpStart, char *source, char *find);
char* strmid_ext(char *source, int lpStart, int lpLength);
int strcmp_ext(char *cp1, char *cp2);
char* strtrim_ext(char *source);
char* strltrim_ext(char *source);
char* strrtrim_ext(char *source);
char* strgleft_ext(char *source, int slcLength);
char* strgright_ext(char *source, int slcLength);
collection* addCollection(collection *base, char *input, int key);
int editCollectionItem(collection *base, int itemKey, char *newInput, int newKey);
collection* getCollectionItem(collection *base, int itemKey);
int removeCollectionItem(collection *base, int itemKey);
int getCollectionCount(collection *base);
collection* getLastItem(collection *base);
void freeCollection(collection *base);
collection* sliceString(char *source, char *separateChar);
collection* sliceString_expr(char *source, char *separateChar);

